package com.quad.innovators.salesease.model.form.base;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Schema(description = "仓库信息对象")
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class WarehouseForm  {

    @Schema(description = "仓库code")
    private String code;

    @Schema(description = "仓库名称")
    @NotBlank(message = "仓库名称不能为空")
    private String name;

    @Schema(description = "仓库负责人")
    private String manager;

    @Schema(description = "联系电话")
    @Pattern(regexp = "^$|^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
    private String telephone;

    @Schema(description = "仓库地址")
    private String address;

    @Schema(description = "描述")
    private String description;

}